package routers

import (
	"gvb-server/Middlewares"
	Api "gvb-server/api"

	"github.com/gin-gonic/gin"
)

func (ApiRoute) ImageUpload(r *gin.RouterGroup) { // 传组
	//ApiGroup2 := Api.GroupAPI.SettingApi.GetSiteInfo
	//r.GET("/siteInfo2", ApiGroup2)

	ApiGroup := Api.GroupAPI.UploadApi
	{
		r.PUT("/upload", Middlewares.InitMiddleware, ApiGroup.UploadImage)
		r.POST("/upload", Middlewares.InitMiddleware, ApiGroup.UploadImageXcx)
	}

	// 图片
	ApiImages := Api.GroupAPI.ImagesApi
	{
		r.GET("/token", Middlewares.InitMiddleware, ApiImages.GetQiNiuToken)
		r.GET("/image", Middlewares.InitMiddleware, ApiImages.Images)
		r.DELETE("/image", Middlewares.InitMiddleware, ApiImages.ImagesDel)
		r.PUT("/image/:id", Middlewares.InitMiddleware, ApiImages.ImagesEdit)
	}
}
